package com.regex;

import java.util.Scanner;

/**
 * @Author WaveHi
 * @Date 11/8/2021 下午 4:23
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description 正则表达式的练习
 */
public class Exce2 {

    public static void main(String[] args) {

        //获取控制台输入
        Scanner sc = new Scanner(System.in);

        //接收输入
        System.out.print("请输入电话号码：");
        String destString = sc.next();

        //判断
        String regex1 = "^1[35-9]\\d{8}";
        if(destString.matches(regex1)) {

            System.out.println("是手机号");

        }else {

            System.out.println("不是手机号");

        }

    }

}
